package cn.com.surker.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 微信小程序消息订阅
 * </p>
 *
 * @author admin
 * @since 2024-03-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class WechatMessageSubscribe implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 下单id
     */
    private Long uid;

    /**
     * appid
     */
    private String appid;

    /**
     * openid
     */
    private String openid;

    private String accountOpenid;

    /**
     * 电话
     */
    private String phone;

    /**
     * 应用类型(后台枚举类型WechatMessageEnum)
     */
    private Integer appType;

    /**
     * 小程序类型(0:生产运输，1：智能工地，3：无人过磅)
     */
    private Integer type;

    /**
     * 是否订阅(1为订阅，0为不未订阅)
     */
    private Integer isSubscribe;

    /**
     * 状态(0:启用1：禁用)
     */
    private Integer status;

    /**
     * 审核备注，当审核结果为不通过时，必填
     */
    private String remark;

    /**
     * 创建人
     */
    private String creater;

    /**
     * 创建日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm")
    private Date createTime;

    /**
     * 更新人
     */
    private String updater;

    /**
     * 更新日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm")
    private Date updateTime;

    public WechatMessageSubscribe(){}
    public WechatMessageSubscribe(Long uid, String appid, String openid, String accountOpenid, String phone, Integer appType, Integer type, Integer isSubscribe, Integer status, String remark, String creater, Date createTime) {
        this.uid = uid;
        this.appid = appid;
        this.openid = openid;
        this.accountOpenid = accountOpenid;
        this.phone = phone;
        this.appType = appType;
        this.type = type;
        this.isSubscribe = isSubscribe;
        this.status = status;
        this.remark = remark;
        this.creater = creater;
        this.createTime = createTime;
    }
}
